/* Options:
Date: 2025-11-06 11:47:32
Version: 8.91
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: http://localhost:20000

//GlobalNamespace: 
//MakePropertiesOptional: False
//AddServiceStackTypes: True
//AddResponseStatus: False
//AddImplicitVersion: 
//AddDescriptionAsComments: True
//IncludeTypes: 
//ExcludeTypes: 
//DefaultImports: 
*/


export interface IReturn<T>
{
    createResponse(): T;
}

export interface IReturnVoid
{
    createResponse(): void;
}

export interface IHasSessionId
{
    sessionId: string;
}

export interface IHasBearerToken
{
    bearerToken: string;
}

export interface IGet
{
}

export interface IPost
{
}

export interface IDelete
{
}

export interface IPatch
{
}

export interface IPut
{
}

// @DataContract
export class Property
{
    // @DataMember(Order=1)
    public name: string;

    // @DataMember(Order=2)
    public value: string;

    public constructor(init?: Partial<Property>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ResponseError
{
    // @DataMember(Order=1)
    public errorCode: string;

    // @DataMember(Order=2)
    public fieldName: string;

    // @DataMember(Order=3)
    public message: string;

    // @DataMember(Order=4)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ResponseError>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ResponseStatus
{
    // @DataMember(Order=1)
    public errorCode: string;

    // @DataMember(Order=2)
    public message: string;

    // @DataMember(Order=3)
    public stackTrace: string;

    // @DataMember(Order=4)
    public errors: ResponseError[];

    // @DataMember(Order=5)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ResponseStatus>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AiContent
{
    /** @description The type of the content part. */
    // @DataMember(Name="type")
    public type: string;

    public constructor(init?: Partial<AiContent>) { (Object as any).assign(this, init); }
}

/** @description The tool calls generated by the model, such as function calls. */
// @DataContract
export class ToolCall
{
    /** @description The ID of the tool call. */
    // @DataMember(Name="id")
    public id: string;

    /** @description The type of the tool. Currently, only `function` is supported. */
    // @DataMember(Name="type")
    public type: string;

    /** @description The function that the model called. */
    // @DataMember(Name="function")
    public function: string;

    public constructor(init?: Partial<ToolCall>) { (Object as any).assign(this, init); }
}

/** @description A list of messages comprising the conversation so far. */
// @DataContract
export class AiMessage
{
    /** @description The contents of the message. */
    // @DataMember(Name="content")
    public content: AiContent[];

    /** @description The role of the author of this message. Valid values are `system`, `user`, `assistant` and `tool`. */
    // @DataMember(Name="role")
    public role: string;

    /** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
    // @DataMember(Name="name")
    public name: string;

    /** @description The tool calls generated by the model, such as function calls. */
    // @DataMember(Name="tool_calls")
    public tool_calls: ToolCall[];

    /** @description Tool call that this message is responding to. */
    // @DataMember(Name="tool_call_id")
    public tool_call_id: string;

    public constructor(init?: Partial<AiMessage>) { (Object as any).assign(this, init); }
}

/** @description Parameters for audio output. Required when audio output is requested with modalities: [audio] */
// @DataContract
export class AiChatAudio
{
    /** @description Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. */
    // @DataMember(Name="format")
    public format: string;

    /** @description The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. */
    // @DataMember(Name="voice")
    public voice: string;

    public constructor(init?: Partial<AiChatAudio>) { (Object as any).assign(this, init); }
}

export enum ResponseFormat
{
    Text = 'text',
    JsonObject = 'json_object',
}

// @DataContract
export class AiResponseFormat
{
    /** @description An object specifying the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106. */
    // @DataMember(Name="response_format")
    public response_format: ResponseFormat;

    public constructor(init?: Partial<AiResponseFormat>) { (Object as any).assign(this, init); }
}

export enum ToolType
{
    Function = 'function',
}

// @DataContract
export class Tool
{
    /** @description The type of the tool. Currently, only function is supported. */
    // @DataMember(Name="type")
    public type: ToolType;

    public constructor(init?: Partial<Tool>) { (Object as any).assign(this, init); }
}

// @DataContract
export class QueryBase
{
    // @DataMember(Order=1)
    public skip?: number;

    // @DataMember(Order=2)
    public take?: number;

    // @DataMember(Order=3)
    public orderBy: string;

    // @DataMember(Order=4)
    public orderByDesc: string;

    // @DataMember(Order=5)
    public include: string;

    // @DataMember(Order=6)
    public fields: string;

    // @DataMember(Order=7)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<QueryBase>) { (Object as any).assign(this, init); }
}

export class QueryDb<T> extends QueryBase
{

    public constructor(init?: Partial<QueryDb<T>>) { super(init); (Object as any).assign(this, init); }
}

// @DataContract
export class ModelUsage
{
    // @DataMember
    public cost: string;

    // @DataMember
    public input: string;

    // @DataMember
    public output: string;

    // @DataMember
    public duration?: number;

    // @DataMember(Name="completion_tokens")
    public completion_tokens?: number;

    // @DataMember
    public inputCachedTokens?: number;

    // @DataMember
    public outputCachedTokens?: number;

    // @DataMember(Name="audio_tokens")
    public audio_tokens?: number;

    // @DataMember(Name="reasoning_tokens")
    public reasoning_tokens?: number;

    // @DataMember
    public totalTokens?: number;

    public constructor(init?: Partial<ModelUsage>) { (Object as any).assign(this, init); }
}

export class ChatCompletionLog
{
    public id: number;
    public refId: string;
    public userId: string;
    public apiKey: string;
    public model: string;
    public provider: string;
    public userPrompt: string;
    public answer: string;
    // @StringLength(2147483647)
    public requestBody: string;

    // @StringLength(2147483647)
    public responseBody: string;

    public errorCode: string;
    public error: ResponseStatus;
    public createdDate: string;
    public tag: string;
    public durationMs?: number;
    public promptTokens?: number;
    public completionTokens?: number;
    public cost: number;
    public providerRef: string;
    public providerModel: string;
    public finishReason: string;
    public usage: ModelUsage;
    public threadId: string;
    public title: string;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ChatCompletionLog>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminUserBase
{
    // @DataMember(Order=1)
    public userName: string;

    // @DataMember(Order=2)
    public firstName: string;

    // @DataMember(Order=3)
    public lastName: string;

    // @DataMember(Order=4)
    public displayName: string;

    // @DataMember(Order=5)
    public email: string;

    // @DataMember(Order=6)
    public password: string;

    // @DataMember(Order=7)
    public profileUrl: string;

    // @DataMember(Order=8)
    public phoneNumber: string;

    // @DataMember(Order=9)
    public userAuthProperties: { [index:string]: string; };

    // @DataMember(Order=10)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AdminUserBase>) { (Object as any).assign(this, init); }
}

export class RequestLog
{
    public id: number;
    public traceId: string;
    public operationName: string;
    public dateTime: string;
    public statusCode: number;
    public statusDescription: string;
    public httpMethod: string;
    public absoluteUri: string;
    public pathInfo: string;
    public request: string;
    // @StringLength(2147483647)
    public requestBody: string;

    public userAuthId: string;
    public sessionId: string;
    public ipAddress: string;
    public forwardedFor: string;
    public referer: string;
    public headers: { [index:string]: string; } = {};
    public formData: { [index:string]: string; };
    public items: { [index:string]: string; } = {};
    public responseHeaders: { [index:string]: string; };
    public response: string;
    // @StringLength(2147483647)
    public responseBody: string;

    // @StringLength(2147483647)
    public sessionBody: string;

    public error: ResponseStatus;
    public exceptionSource: string;
    public exceptionDataBody: string;
    public requestDuration: string;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<RequestLog>) { (Object as any).assign(this, init); }
}

export class RedisEndpointInfo
{
    public host: string;
    public port: number;
    public ssl?: boolean;
    public db: number;
    public username: string;
    public password: string;

    public constructor(init?: Partial<RedisEndpointInfo>) { (Object as any).assign(this, init); }
}

export enum BackgroundJobState
{
    Queued = 'Queued',
    Started = 'Started',
    Executed = 'Executed',
    Completed = 'Completed',
    Failed = 'Failed',
    Cancelled = 'Cancelled',
}

export class BackgroundJobBase
{
    public id: number;
    public parentId?: number;
    public refId: string;
    public worker: string;
    public tag: string;
    public batchId: string;
    public callback: string;
    public dependsOn?: number;
    public runAfter?: string;
    public createdDate: string;
    public createdBy: string;
    public requestId: string;
    public requestType: string;
    public command: string;
    public request: string;
    // @StringLength(2147483647)
    public requestBody: string;

    public userId: string;
    public response: string;
    // @StringLength(2147483647)
    public responseBody: string;

    public state: BackgroundJobState;
    public startedDate?: string;
    public completedDate?: string;
    public notifiedDate?: string;
    public retryLimit?: number;
    public attempts: number;
    public durationMs: number;
    public timeoutSecs?: number;
    public progress?: number;
    public status: string;
    // @StringLength(2147483647)
    public logs: string;

    public lastActivityDate?: string;
    public replyTo: string;
    public errorCode: string;
    public error: ResponseStatus;
    public args: { [index:string]: string; };
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<BackgroundJobBase>) { (Object as any).assign(this, init); }
}

export class BackgroundJob extends BackgroundJobBase
{
    public id: number;

    public constructor(init?: Partial<BackgroundJob>) { super(init); (Object as any).assign(this, init); }
}

export class JobSummary
{
    public id: number;
    public parentId?: number;
    public refId: string;
    public worker: string;
    public tag: string;
    public batchId: string;
    public createdDate: string;
    public createdBy: string;
    public requestType: string;
    public command: string;
    public request: string;
    public response: string;
    public userId: string;
    public callback: string;
    public startedDate?: string;
    public completedDate?: string;
    public state: BackgroundJobState;
    public durationMs: number;
    public attempts: number;
    public errorCode: string;
    public errorMessage: string;

    public constructor(init?: Partial<JobSummary>) { (Object as any).assign(this, init); }
}

export class BackgroundJobOptions
{
    public refId: string;
    public parentId?: number;
    public worker: string;
    public runAfter?: string;
    public callback: string;
    public dependsOn?: number;
    public userId: string;
    public retryLimit?: number;
    public replyTo: string;
    public tag: string;
    public batchId: string;
    public createdBy: string;
    public timeoutSecs?: number;
    public timeout?: string;
    public args: { [index:string]: string; };
    public runCommand?: boolean;

    public constructor(init?: Partial<BackgroundJobOptions>) { (Object as any).assign(this, init); }
}

export class ScheduledTask
{
    public id: number;
    public name: string;
    public interval?: string;
    public cronExpression: string;
    public requestType: string;
    public command: string;
    public request: string;
    public requestBody: string;
    public options: BackgroundJobOptions;
    public lastRun?: string;
    public lastJobId?: number;

    public constructor(init?: Partial<ScheduledTask>) { (Object as any).assign(this, init); }
}

export class CompletedJob extends BackgroundJobBase
{

    public constructor(init?: Partial<CompletedJob>) { super(init); (Object as any).assign(this, init); }
}

export class FailedJob extends BackgroundJobBase
{

    public constructor(init?: Partial<FailedJob>) { super(init); (Object as any).assign(this, init); }
}

export class ValidateRule
{
    public validator: string;
    public condition: string;
    public errorCode: string;
    public message: string;

    public constructor(init?: Partial<ValidateRule>) { (Object as any).assign(this, init); }
}

export class ValidationRule extends ValidateRule
{
    public id: number;
    // @Required()
    public type: string;

    public field: string;
    public createdBy: string;
    public createdDate?: string;
    public modifiedBy: string;
    public modifiedDate?: string;
    public suspendedBy: string;
    public suspendedDate?: string;
    public notes: string;

    public constructor(init?: Partial<ValidationRule>) { super(init); (Object as any).assign(this, init); }
}

export class AppInfo
{
    public baseUrl: string;
    public serviceStackVersion: string;
    public serviceName: string;
    public apiVersion: string;
    public serviceDescription: string;
    public serviceIconUrl: string;
    public brandUrl: string;
    public brandImageUrl: string;
    public textColor: string;
    public linkColor: string;
    public backgroundColor: string;
    public backgroundImageUrl: string;
    public iconUrl: string;
    public jsTextCase: string;
    public useSystemJson: string;
    public endpointRouting: string[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AppInfo>) { (Object as any).assign(this, init); }
}

export class ImageInfo
{
    public svg: string;
    public uri: string;
    public alt: string;
    public cls: string;

    public constructor(init?: Partial<ImageInfo>) { (Object as any).assign(this, init); }
}

export class LinkInfo
{
    public id: string;
    public href: string;
    public label: string;
    public icon: ImageInfo;
    public show: string;
    public hide: string;

    public constructor(init?: Partial<LinkInfo>) { (Object as any).assign(this, init); }
}

export class ThemeInfo
{
    public form: string;
    public modelIcon: ImageInfo;

    public constructor(init?: Partial<ThemeInfo>) { (Object as any).assign(this, init); }
}

export class ApiCss
{
    public form: string;
    public fieldset: string;
    public field: string;

    public constructor(init?: Partial<ApiCss>) { (Object as any).assign(this, init); }
}

export class AppTags
{
    public default: string;
    public other: string;

    public constructor(init?: Partial<AppTags>) { (Object as any).assign(this, init); }
}

export class LocodeUi
{
    public css: ApiCss;
    public tags: AppTags;
    public maxFieldLength: number;
    public maxNestedFields: number;
    public maxNestedFieldLength: number;

    public constructor(init?: Partial<LocodeUi>) { (Object as any).assign(this, init); }
}

export class ExplorerUi
{
    public css: ApiCss;
    public tags: AppTags;
    public jsConfig: string;

    public constructor(init?: Partial<ExplorerUi>) { (Object as any).assign(this, init); }
}

export class PageInfo
{
    public page: string;
    public component: string;

    public constructor(init?: Partial<PageInfo>) { (Object as any).assign(this, init); }
}

export class AdminUi
{
    public css: ApiCss;
    public pages: PageInfo[];

    public constructor(init?: Partial<AdminUi>) { (Object as any).assign(this, init); }
}

export class FormatInfo
{
    public method: string;
    public options: string;
    public locale: string;

    public constructor(init?: Partial<FormatInfo>) { (Object as any).assign(this, init); }
}

export class ApiFormat
{
    public locale: string;
    public assumeUtc: boolean;
    public number: FormatInfo;
    public date: FormatInfo;

    public constructor(init?: Partial<ApiFormat>) { (Object as any).assign(this, init); }
}

export class UiInfo
{
    public brandIcon: ImageInfo;
    public userIcon: ImageInfo;
    public hideTags: string[];
    public modules: string[];
    public alwaysHideTags: string[];
    public adminLinks: LinkInfo[];
    public adminLinksOrder: string[];
    public theme: ThemeInfo;
    public locode: LocodeUi;
    public explorer: ExplorerUi;
    public admin: AdminUi;
    public defaultFormats: ApiFormat;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<UiInfo>) { (Object as any).assign(this, init); }
}

export class ConfigInfo
{
    public debugMode?: boolean;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ConfigInfo>) { (Object as any).assign(this, init); }
}

export class NavItem
{
    public label: string;
    public href: string;
    public exact?: boolean;
    public id: string;
    public className: string;
    public iconClass: string;
    public iconSrc: string;
    public show: string;
    public hide: string;
    public children: NavItem[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<NavItem>) { (Object as any).assign(this, init); }
}

export class FieldCss
{
    public field: string;
    public input: string;
    public label: string;

    public constructor(init?: Partial<FieldCss>) { (Object as any).assign(this, init); }
}

export class InputInfo
{
    public id: string;
    public name: string;
    public type: string;
    public value: string;
    public placeholder: string;
    public help: string;
    public label: string;
    public title: string;
    public size: string;
    public pattern: string;
    public readOnly?: boolean;
    public required?: boolean;
    public disabled?: boolean;
    public autocomplete: string;
    public autofocus: string;
    public min: string;
    public max: string;
    public step: string;
    public minLength?: number;
    public maxLength?: number;
    public accept: string;
    public capture: string;
    public multiple?: boolean;
    public allowableValues: string[];
    public allowableEntries: KeyValuePair<string, string>[];
    public options: string;
    public ignore?: boolean;
    public css: FieldCss;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<InputInfo>) { (Object as any).assign(this, init); }
}

export class MetaAuthProvider
{
    public name: string;
    public label: string;
    public type: string;
    public navItem: NavItem;
    public icon: ImageInfo;
    public formLayout: InputInfo[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<MetaAuthProvider>) { (Object as any).assign(this, init); }
}

export class IdentityAuthInfo
{
    public hasRefreshToken?: boolean;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<IdentityAuthInfo>) { (Object as any).assign(this, init); }
}

export class AuthInfo
{
    public hasAuthSecret?: boolean;
    public hasAuthRepository?: boolean;
    public includesRoles?: boolean;
    public includesOAuthTokens?: boolean;
    public htmlRedirect: string;
    public authProviders: MetaAuthProvider[];
    public identityAuth: IdentityAuthInfo;
    public roleLinks: { [index:string]: LinkInfo[]; };
    public serviceRoutes: { [index:string]: string[]; };
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AuthInfo>) { (Object as any).assign(this, init); }
}

export class ApiKeyInfo
{
    public label: string;
    public httpHeader: string;
    public scopes: string[];
    public features: string[];
    public requestTypes: string[];
    public expiresIn: KeyValuePair<string,string>[];
    public hide: string[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ApiKeyInfo>) { (Object as any).assign(this, init); }
}

export class MetadataTypeName
{
    public name: string;
    public namespace: string;
    public genericArgs: string[];

    public constructor(init?: Partial<MetadataTypeName>) { (Object as any).assign(this, init); }
}

export class MetadataDataContract
{
    public name: string;
    public namespace: string;

    public constructor(init?: Partial<MetadataDataContract>) { (Object as any).assign(this, init); }
}

export class MetadataDataMember
{
    public name: string;
    public order?: number;
    public isRequired?: boolean;
    public emitDefaultValue?: boolean;

    public constructor(init?: Partial<MetadataDataMember>) { (Object as any).assign(this, init); }
}

export class MetadataAttribute
{
    public name: string;
    public constructorArgs: MetadataPropertyType[];
    public args: MetadataPropertyType[];

    public constructor(init?: Partial<MetadataAttribute>) { (Object as any).assign(this, init); }
}

export class RefInfo
{
    public model: string;
    public selfId: string;
    public refId: string;
    public refLabel: string;
    public queryApi: string;

    public constructor(init?: Partial<RefInfo>) { (Object as any).assign(this, init); }
}

export class MetadataPropertyType
{
    public name: string;
    public type: string;
    public namespace: string;
    public isValueType?: boolean;
    public isEnum?: boolean;
    public isPrimaryKey?: boolean;
    public genericArgs: string[];
    public value: string;
    public description: string;
    public dataMember: MetadataDataMember;
    public readOnly?: boolean;
    public paramType: string;
    public displayType: string;
    public isRequired?: boolean;
    public allowableValues: string[];
    public allowableMin?: number;
    public allowableMax?: number;
    public attributes: MetadataAttribute[];
    public uploadTo: string;
    public input: InputInfo;
    public format: FormatInfo;
    public ref: RefInfo;

    public constructor(init?: Partial<MetadataPropertyType>) { (Object as any).assign(this, init); }
}

export class MetadataType
{
    public name: string;
    public namespace: string;
    public genericArgs: string[];
    public inherits: MetadataTypeName;
    public implements: MetadataTypeName[];
    public displayType: string;
    public description: string;
    public notes: string;
    public icon: ImageInfo;
    public isNested?: boolean;
    public isEnum?: boolean;
    public isEnumInt?: boolean;
    public isInterface?: boolean;
    public isAbstract?: boolean;
    public isGenericTypeDef?: boolean;
    public dataContract: MetadataDataContract;
    public properties: MetadataPropertyType[];
    public attributes: MetadataAttribute[];
    public innerTypes: MetadataTypeName[];
    public enumNames: string[];
    public enumValues: string[];
    public enumMemberValues: string[];
    public enumDescriptions: string[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<MetadataType>) { (Object as any).assign(this, init); }
}

export class CommandInfo
{
    public name: string;
    public tag: string;
    public request: MetadataType;
    public response: MetadataType;

    public constructor(init?: Partial<CommandInfo>) { (Object as any).assign(this, init); }
}

export class CommandsInfo
{
    public commands: CommandInfo[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<CommandsInfo>) { (Object as any).assign(this, init); }
}

export class AutoQueryConvention
{
    public name: string;
    public value: string;
    public types: string;
    public valueType: string;

    public constructor(init?: Partial<AutoQueryConvention>) { (Object as any).assign(this, init); }
}

export class AutoQueryInfo
{
    public maxLimit?: number;
    public untypedQueries?: boolean;
    public rawSqlFilters?: boolean;
    public autoQueryViewer?: boolean;
    public async?: boolean;
    public orderByPrimaryKey?: boolean;
    public crudEvents?: boolean;
    public crudEventsServices?: boolean;
    public accessRole: string;
    public namedConnection: string;
    public viewerConventions: AutoQueryConvention[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AutoQueryInfo>) { (Object as any).assign(this, init); }
}

export class ScriptMethodType
{
    public name: string;
    public paramNames: string[];
    public paramTypes: string[];
    public returnType: string;

    public constructor(init?: Partial<ScriptMethodType>) { (Object as any).assign(this, init); }
}

export class ValidationInfo
{
    public hasValidationSource?: boolean;
    public hasValidationSourceAdmin?: boolean;
    public serviceRoutes: { [index:string]: string[]; };
    public typeValidators: ScriptMethodType[];
    public propertyValidators: ScriptMethodType[];
    public accessRole: string;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ValidationInfo>) { (Object as any).assign(this, init); }
}

export class SharpPagesInfo
{
    public apiPath: string;
    public scriptAdminRole: string;
    public metadataDebugAdminRole: string;
    public metadataDebug?: boolean;
    public spaFallback?: boolean;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<SharpPagesInfo>) { (Object as any).assign(this, init); }
}

export class RequestLogsAnalytics
{
    public months: string[];
    public tabs: { [index:string]: string; };
    public disableAnalytics?: boolean;
    public disableUserAnalytics?: boolean;
    public disableApiKeyAnalytics?: boolean;

    public constructor(init?: Partial<RequestLogsAnalytics>) { (Object as any).assign(this, init); }
}

export class RequestLogsInfo
{
    public accessRole: string;
    public requestLogger: string;
    public defaultLimit: number;
    public serviceRoutes: { [index:string]: string[]; };
    public analytics: RequestLogsAnalytics;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<RequestLogsInfo>) { (Object as any).assign(this, init); }
}

export class ProfilingInfo
{
    public accessRole: string;
    public defaultLimit: number;
    public summaryFields: string[];
    public tagLabel: string;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ProfilingInfo>) { (Object as any).assign(this, init); }
}

export class FilesUploadLocation
{
    public name: string;
    public readAccessRole: string;
    public writeAccessRole: string;
    public allowExtensions: string[];
    public allowOperations: string;
    public maxFileCount?: number;
    public minFileBytes?: number;
    public maxFileBytes?: number;

    public constructor(init?: Partial<FilesUploadLocation>) { (Object as any).assign(this, init); }
}

export class FilesUploadInfo
{
    public basePath: string;
    public locations: FilesUploadLocation[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<FilesUploadInfo>) { (Object as any).assign(this, init); }
}

export class MediaRule
{
    public size: string;
    public rule: string;
    public applyTo: string[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<MediaRule>) { (Object as any).assign(this, init); }
}

export class AdminUsersInfo
{
    public accessRole: string;
    public enabled: string[];
    public userAuth: MetadataType;
    public allRoles: string[];
    public allPermissions: string[];
    public queryUserAuthProperties: string[];
    public queryMediaRules: MediaRule[];
    public formLayout: InputInfo[];
    public css: ApiCss;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AdminUsersInfo>) { (Object as any).assign(this, init); }
}

export class AdminIdentityUsersInfo
{
    public accessRole: string;
    public enabled: string[];
    public identityUser: MetadataType;
    public allRoles: string[];
    public allPermissions: string[];
    public queryIdentityUserProperties: string[];
    public queryMediaRules: MediaRule[];
    public formLayout: InputInfo[];
    public css: ApiCss;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AdminIdentityUsersInfo>) { (Object as any).assign(this, init); }
}

export class AdminRedisInfo
{
    public queryLimit: number;
    public databases: number[];
    public modifiableConnection?: boolean;
    public endpoint: RedisEndpointInfo;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AdminRedisInfo>) { (Object as any).assign(this, init); }
}

export class SchemaInfo
{
    public alias: string;
    public name: string;
    public tables: string[];

    public constructor(init?: Partial<SchemaInfo>) { (Object as any).assign(this, init); }
}

export class DatabaseInfo
{
    public alias: string;
    public name: string;
    public schemas: SchemaInfo[];

    public constructor(init?: Partial<DatabaseInfo>) { (Object as any).assign(this, init); }
}

export class AdminDatabaseInfo
{
    public queryLimit: number;
    public databases: DatabaseInfo[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AdminDatabaseInfo>) { (Object as any).assign(this, init); }
}

export class PluginInfo
{
    public loaded: string[];
    public auth: AuthInfo;
    public apiKey: ApiKeyInfo;
    public commands: CommandsInfo;
    public autoQuery: AutoQueryInfo;
    public validation: ValidationInfo;
    public sharpPages: SharpPagesInfo;
    public requestLogs: RequestLogsInfo;
    public profiling: ProfilingInfo;
    public filesUpload: FilesUploadInfo;
    public adminUsers: AdminUsersInfo;
    public adminIdentityUsers: AdminIdentityUsersInfo;
    public adminRedis: AdminRedisInfo;
    public adminDatabase: AdminDatabaseInfo;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<PluginInfo>) { (Object as any).assign(this, init); }
}

export class CustomPluginInfo
{
    public accessRole: string;
    public serviceRoutes: { [index:string]: string[]; };
    public enabled: string[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<CustomPluginInfo>) { (Object as any).assign(this, init); }
}

export class MetadataTypesConfig
{
    public baseUrl: string;
    public makePartial: boolean;
    public makeVirtual: boolean;
    public makeInternal: boolean;
    public baseClass: string;
    public package: string;
    public addReturnMarker: boolean;
    public addDescriptionAsComments: boolean;
    public addDocAnnotations: boolean;
    public addDataContractAttributes: boolean;
    public addIndexesToDataMembers: boolean;
    public addGeneratedCodeAttributes: boolean;
    public addImplicitVersion?: number;
    public addResponseStatus: boolean;
    public addServiceStackTypes: boolean;
    public addModelExtensions: boolean;
    public addPropertyAccessors: boolean;
    public excludeGenericBaseTypes: boolean;
    public settersReturnThis: boolean;
    public addNullableAnnotations: boolean;
    public makePropertiesOptional: boolean;
    public exportAsTypes: boolean;
    public excludeImplementedInterfaces: boolean;
    public addDefaultXmlNamespace: string;
    public makeDataContractsExtensible: boolean;
    public initializeCollections: boolean;
    public addNamespaces: string[];
    public defaultNamespaces: string[];
    public defaultImports: string[];
    public includeTypes: string[];
    public excludeTypes: string[];
    public exportTags: string[];
    public treatTypesAsStrings: string[];
    public exportValueTypes: boolean;
    public globalNamespace: string;
    public excludeNamespace: boolean;
    public dataClass: string;
    public dataClassJson: string;
    public ignoreTypes: string[];
    public exportTypes: string[];
    public exportAttributes: string[];
    public ignoreTypesInNamespaces: string[];

    public constructor(init?: Partial<MetadataTypesConfig>) { (Object as any).assign(this, init); }
}

export class MetadataRoute
{
    public path: string;
    public verbs: string;
    public notes: string;
    public summary: string;

    public constructor(init?: Partial<MetadataRoute>) { (Object as any).assign(this, init); }
}

export class ApiUiInfo
{
    public locodeCss: ApiCss;
    public explorerCss: ApiCss;
    public formLayout: InputInfo[];
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<ApiUiInfo>) { (Object as any).assign(this, init); }
}

export class MetadataOperationType
{
    public request: MetadataType;
    public response: MetadataType;
    public actions: string[];
    public returnsVoid?: boolean;
    public method: string;
    public returnType: MetadataTypeName;
    public routes: MetadataRoute[];
    public dataModel: MetadataTypeName;
    public viewModel: MetadataTypeName;
    public requiresAuth?: boolean;
    public requiresApiKey?: boolean;
    public requiredRoles: string[];
    public requiresAnyRole: string[];
    public requiredPermissions: string[];
    public requiresAnyPermission: string[];
    public tags: string[];
    public ui: ApiUiInfo;

    public constructor(init?: Partial<MetadataOperationType>) { (Object as any).assign(this, init); }
}

export class MetadataTypes
{
    public config: MetadataTypesConfig;
    public namespaces: string[];
    public types: MetadataType[];
    public operations: MetadataOperationType[];

    public constructor(init?: Partial<MetadataTypes>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminRole
{

    public constructor(init?: Partial<AdminRole>) { (Object as any).assign(this, init); }
}

export class ServerStats
{
    public redis: { [index:string]: number; };
    public serverEvents: { [index:string]: string; };
    public mqDescription: string;
    public mqWorkers: { [index:string]: number; };

    public constructor(init?: Partial<ServerStats>) { (Object as any).assign(this, init); }
}

// @DataContract
export class PartialApiKey
{
    // @DataMember(Order=1)
    public id: number;

    // @DataMember(Order=2)
    public name: string;

    // @DataMember(Order=3)
    public userId: string;

    // @DataMember(Order=4)
    public userName: string;

    // @DataMember(Order=5)
    public visibleKey: string;

    // @DataMember(Order=6)
    public environment: string;

    // @DataMember(Order=7)
    public createdDate: string;

    // @DataMember(Order=8)
    public expiryDate?: string;

    // @DataMember(Order=9)
    public cancelledDate?: string;

    // @DataMember(Order=10)
    public lastUsedDate?: string;

    // @DataMember(Order=11)
    public scopes: string[];

    // @DataMember(Order=12)
    public features: string[];

    // @DataMember(Order=13)
    public restrictTo: string[];

    // @DataMember(Order=14)
    public notes: string;

    // @DataMember(Order=15)
    public refId?: number;

    // @DataMember(Order=16)
    public refIdStr: string;

    // @DataMember(Order=17)
    public meta: { [index:string]: string; };

    // @DataMember(Order=18)
    public active: boolean;

    public constructor(init?: Partial<PartialApiKey>) { (Object as any).assign(this, init); }
}

/** @description Annotations for the message, when applicable, as when using the web search tool. */
// @DataContract
export class UrlCitation
{
    /** @description The index of the last character of the URL citation in the message. */
    // @DataMember(Name="end_index")
    public end_index: number;

    /** @description The index of the first character of the URL citation in the message. */
    // @DataMember(Name="start_index")
    public start_index: number;

    /** @description The title of the web resource. */
    // @DataMember(Name="title")
    public title: string;

    /** @description The URL of the web resource. */
    // @DataMember(Name="url")
    public url: string;

    public constructor(init?: Partial<UrlCitation>) { (Object as any).assign(this, init); }
}

/** @description Annotations for the message, when applicable, as when using the web search tool. */
// @DataContract
export class ChoiceAnnotation
{
    /** @description The type of the URL citation. Always url_citation. */
    // @DataMember(Name="type")
    public type: string;

    /** @description A URL citation when using web search. */
    // @DataMember(Name="url_citation")
    public url_citation: UrlCitation;

    public constructor(init?: Partial<ChoiceAnnotation>) { (Object as any).assign(this, init); }
}

/** @description If the audio output modality is requested, this object contains data about the audio response from the model. */
// @DataContract
export class ChoiceAudio
{
    /** @description Base64 encoded audio bytes generated by the model, in the format specified in the request. */
    // @DataMember(Name="data")
    public data: string;

    /** @description The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations. */
    // @DataMember(Name="expires_at")
    public expires_at: number;

    /** @description Unique identifier for this audio response. */
    // @DataMember(Name="id")
    public id: string;

    /** @description Transcript of the audio generated by the model. */
    // @DataMember(Name="transcript")
    public transcript: string;

    public constructor(init?: Partial<ChoiceAudio>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ChoiceMessage
{
    /** @description The contents of the message. */
    // @DataMember(Name="content")
    public content: string;

    /** @description The refusal message generated by the model. */
    // @DataMember(Name="refusal")
    public refusal: string;

    /** @description The reasoning process used by the model. */
    // @DataMember(Name="reasoning")
    public reasoning: string;

    /** @description The role of the author of this message. */
    // @DataMember(Name="role")
    public role: string;

    /** @description Annotations for the message, when applicable, as when using the web search tool. */
    // @DataMember(Name="annotations")
    public annotations: ChoiceAnnotation[];

    /** @description If the audio output modality is requested, this object contains data about the audio response from the model. */
    // @DataMember(Name="audio")
    public audio: ChoiceAudio;

    /** @description The tool calls generated by the model, such as function calls. */
    // @DataMember(Name="tool_calls")
    public tool_calls: ToolCall[];

    public constructor(init?: Partial<ChoiceMessage>) { (Object as any).assign(this, init); }
}

// @DataContract
export class Choice
{
    /** @description The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool */
    // @DataMember(Name="finish_reason")
    public finish_reason: string;

    /** @description The index of the choice in the list of choices. */
    // @DataMember(Name="index")
    public index: number;

    /** @description A chat completion message generated by the model. */
    // @DataMember(Name="message")
    public message: ChoiceMessage;

    public constructor(init?: Partial<Choice>) { (Object as any).assign(this, init); }
}

/** @description Usage statistics for the completion request. */
// @DataContract
export class AiCompletionUsage
{
    /** @description When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. */
    // @DataMember(Name="accepted_prediction_tokens")
    public accepted_prediction_tokens: number;

    /** @description Audio input tokens generated by the model. */
    // @DataMember(Name="audio_tokens")
    public audio_tokens: number;

    /** @description Tokens generated by the model for reasoning. */
    // @DataMember(Name="reasoning_tokens")
    public reasoning_tokens: number;

    /** @description When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. */
    // @DataMember(Name="rejected_prediction_tokens")
    public rejected_prediction_tokens: number;

    public constructor(init?: Partial<AiCompletionUsage>) { (Object as any).assign(this, init); }
}

/** @description Breakdown of tokens used in the prompt. */
// @DataContract
export class AiPromptUsage
{
    /** @description When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. */
    // @DataMember(Name="accepted_prediction_tokens")
    public accepted_prediction_tokens: number;

    /** @description Audio input tokens present in the prompt. */
    // @DataMember(Name="audio_tokens")
    public audio_tokens: number;

    /** @description Cached tokens present in the prompt. */
    // @DataMember(Name="cached_tokens")
    public cached_tokens: number;

    public constructor(init?: Partial<AiPromptUsage>) { (Object as any).assign(this, init); }
}

/** @description Usage statistics for the completion request. */
// @DataContract
export class AiUsage
{
    /** @description Number of tokens in the generated completion. */
    // @DataMember(Name="completion_tokens")
    public completion_tokens: number;

    /** @description Number of tokens in the prompt. */
    // @DataMember(Name="prompt_tokens")
    public prompt_tokens: number;

    /** @description Total number of tokens used in the request (prompt + completion). */
    // @DataMember(Name="total_tokens")
    public total_tokens: number;

    /** @description Breakdown of tokens used in a completion. */
    // @DataMember(Name="completion_tokens_details")
    public completion_tokens_details: AiCompletionUsage;

    /** @description Breakdown of tokens used in the prompt. */
    // @DataMember(Name="prompt_tokens_details")
    public prompt_tokens_details: AiPromptUsage;

    public constructor(init?: Partial<AiUsage>) { (Object as any).assign(this, init); }
}

// @DataContract
export class QueryResponse<T>
{
    // @DataMember(Order=1)
    public offset: number;

    // @DataMember(Order=2)
    public total: number;

    // @DataMember(Order=3)
    public results: T[] = [];

    // @DataMember(Order=4)
    public meta: { [index:string]: string; };

    // @DataMember(Order=5)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<QueryResponse<T>>) { (Object as any).assign(this, init); }
}

export class ChatCompletionStat
{
    public name: string;
    public requests: number;
    public inputTokens: number;
    public outputTokens: number;
    public cost: number;

    public constructor(init?: Partial<ChatCompletionStat>) { (Object as any).assign(this, init); }
}

export class DiagnosticEntry
{
    public id: number;
    public traceId: string;
    public source: string;
    public eventType: string;
    public message: string;
    public operation: string;
    public threadId: number;
    public error: ResponseStatus;
    public commandType: string;
    public command: string;
    public userAuthId: string;
    public sessionId: string;
    public arg: string;
    public args: string[];
    public argLengths: number[];
    public namedArgs: { [index:string]: Object; };
    public duration?: string;
    public timestamp: number;
    public date: string;
    public tag: string;
    public stackTrace: string;
    public meta: { [index:string]: string; } = {};

    public constructor(init?: Partial<DiagnosticEntry>) { (Object as any).assign(this, init); }
}

export class RedisSearchResult
{
    public id: string;
    public type: string;
    public ttl: number;
    public size: number;

    public constructor(init?: Partial<RedisSearchResult>) { (Object as any).assign(this, init); }
}

export class RedisText
{
    public text: string;
    public children: RedisText[];

    public constructor(init?: Partial<RedisText>) { (Object as any).assign(this, init); }
}

export class CommandSummary
{
    public type: string;
    public name: string;
    public count: number;
    public failed: number;
    public retries: number;
    public totalMs: number;
    public minMs: number;
    public maxMs: number;
    public averageMs: number;
    public medianMs: number;
    public lastError: ResponseStatus;
    public timings: ConcurrentQueue<number>;

    public constructor(init?: Partial<CommandSummary>) { (Object as any).assign(this, init); }
}

export class CommandResult
{
    public type: string;
    public name: string;
    public ms?: number;
    public at: string;
    public request: string;
    public retries?: number;
    public attempt: number;
    public error: ResponseStatus;

    public constructor(init?: Partial<CommandResult>) { (Object as any).assign(this, init); }
}

export class JobStatSummary
{
    public name: string;
    public total: number;
    public completed: number;
    public retries: number;
    public failed: number;
    public cancelled: number;

    public constructor(init?: Partial<JobStatSummary>) { (Object as any).assign(this, init); }
}

export class HourSummary
{
    public hour: string;
    public total: number;
    public completed: number;
    public failed: number;
    public cancelled: number;

    public constructor(init?: Partial<HourSummary>) { (Object as any).assign(this, init); }
}

export class WorkerStats
{
    public name: string;
    public queued: number;
    public received: number;
    public completed: number;
    public retries: number;
    public failed: number;
    public runningJob?: number;
    public runningTime?: string;

    public constructor(init?: Partial<WorkerStats>) { (Object as any).assign(this, init); }
}

export class RequestLogEntry
{
    public id: number;
    public traceId: string;
    public operationName: string;
    public dateTime: string;
    public statusCode: number;
    public statusDescription: string;
    public httpMethod: string;
    public absoluteUri: string;
    public pathInfo: string;
    // @StringLength(2147483647)
    public requestBody: string;

    public requestDto: Object;
    public userAuthId: string;
    public sessionId: string;
    public ipAddress: string;
    public forwardedFor: string;
    public referer: string;
    public headers: { [index:string]: string; };
    public formData: { [index:string]: string; };
    public items: { [index:string]: string; };
    public responseHeaders: { [index:string]: string; };
    public session: Object;
    public responseDto: Object;
    public errorResponse: Object;
    public exceptionSource: string;
    public exceptionData: any;
    public requestDuration: string;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<RequestLogEntry>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AnalyticsLogInfo
{
    // @DataMember(Order=1)
    public id: number;

    // @DataMember(Order=2)
    public dateTime: string;

    // @DataMember(Order=3)
    public browser: string;

    // @DataMember(Order=4)
    public device: string;

    // @DataMember(Order=5)
    public bot: string;

    // @DataMember(Order=6)
    public op: string;

    // @DataMember(Order=7)
    public userId: string;

    // @DataMember(Order=8)
    public userName: string;

    // @DataMember(Order=9)
    public apiKey: string;

    // @DataMember(Order=10)
    public ip: string;

    public constructor(init?: Partial<AnalyticsLogInfo>) { (Object as any).assign(this, init); }
}

// @DataContract
export class RequestSummary
{
    // @DataMember(Order=1)
    public name: string;

    // @DataMember(Order=2)
    public totalRequests: number;

    // @DataMember(Order=3)
    public totalRequestLength: number;

    // @DataMember(Order=4)
    public minRequestLength: number;

    // @DataMember(Order=5)
    public maxRequestLength: number;

    // @DataMember(Order=6)
    public totalDuration: number;

    // @DataMember(Order=7)
    public minDuration: number;

    // @DataMember(Order=8)
    public maxDuration: number;

    // @DataMember(Order=9)
    public status: { [index:number]: number; };

    // @DataMember(Order=10)
    public durations: { [index:string]: number; };

    // @DataMember(Order=11)
    public apis: { [index:string]: number; };

    // @DataMember(Order=12)
    public users: { [index:string]: number; };

    // @DataMember(Order=13)
    public ips: { [index:string]: number; };

    // @DataMember(Order=14)
    public apiKeys: { [index:string]: number; };

    public constructor(init?: Partial<RequestSummary>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AnalyticsReports
{
    // @DataMember(Order=1)
    public id: number;

    // @DataMember(Order=2)
    public created: string;

    // @DataMember(Order=3)
    public version: number;

    // @DataMember(Order=4)
    public apis: { [index:string]: RequestSummary; };

    // @DataMember(Order=5)
    public users: { [index:string]: RequestSummary; };

    // @DataMember(Order=6)
    public tags: { [index:string]: RequestSummary; };

    // @DataMember(Order=7)
    public status: { [index:string]: RequestSummary; };

    // @DataMember(Order=8)
    public days: { [index:string]: RequestSummary; };

    // @DataMember(Order=9)
    public apiKeys: { [index:string]: RequestSummary; };

    // @DataMember(Order=10)
    public ips: { [index:string]: RequestSummary; };

    // @DataMember(Order=11)
    public browsers: { [index:string]: RequestSummary; };

    // @DataMember(Order=12)
    public devices: { [index:string]: RequestSummary; };

    // @DataMember(Order=13)
    public bots: { [index:string]: RequestSummary; };

    // @DataMember(Order=14)
    public durations: { [index:string]: number; };

    public constructor(init?: Partial<AnalyticsReports>) { (Object as any).assign(this, init); }
}

/** @description Text content part */
// @DataContract
export class AiTextContent extends AiContent
{
    /** @description The text content. */
    // @DataMember(Name="text")
    public text: string;

    public constructor(init?: Partial<AiTextContent>) { super(init); (Object as any).assign(this, init); }
}

// @DataContract
export class AiImageUrl
{
    /** @description Either a URL of the image or the base64 encoded image data. */
    // @DataMember(Name="url")
    public url: string;

    public constructor(init?: Partial<AiImageUrl>) { (Object as any).assign(this, init); }
}

/** @description Image content part */
// @DataContract
export class AiImageContent extends AiContent
{
    /** @description The image for this content. */
    // @DataMember(Name="image_url")
    public image_url: AiImageUrl;

    public constructor(init?: Partial<AiImageContent>) { super(init); (Object as any).assign(this, init); }
}

/** @description Audio content part */
// @DataContract
export class AiInputAudio
{
    /** @description URL or Base64 encoded audio data. */
    // @DataMember(Name="data")
    public data: string;

    /** @description The format of the encoded audio data. Currently supports 'wav' and 'mp3'. */
    // @DataMember(Name="format")
    public format: string;

    public constructor(init?: Partial<AiInputAudio>) { (Object as any).assign(this, init); }
}

/** @description Audio content part */
// @DataContract
export class AiAudioContent extends AiContent
{
    /** @description The audio input for this content. */
    // @DataMember(Name="input_audio")
    public input_audio: AiInputAudio;

    public constructor(init?: Partial<AiAudioContent>) { super(init); (Object as any).assign(this, init); }
}

/** @description File content part */
// @DataContract
export class AiFile
{
    /** @description The URL or base64 encoded file data, used when passing the file to the model as a string. */
    // @DataMember(Name="file_data")
    public file_data: string;

    /** @description The name of the file, used when passing the file to the model as a string. */
    // @DataMember(Name="filename")
    public filename: string;

    /** @description The ID of an uploaded file to use as input. */
    // @DataMember(Name="file_id")
    public file_id: string;

    public constructor(init?: Partial<AiFile>) { (Object as any).assign(this, init); }
}

/** @description File content part */
// @DataContract
export class AiFileContent extends AiContent
{
    /** @description The file input for this content. */
    // @DataMember(Name="file")
    public file: AiFile;

    public constructor(init?: Partial<AiFileContent>) { super(init); (Object as any).assign(this, init); }
}

export class KeyValuePair<TKey, TValue>
{
    public key: TKey;
    public value: TValue;

    public constructor(init?: Partial<KeyValuePair<TKey, TValue>>) { (Object as any).assign(this, init); }
}

export class AppMetadata
{
    public date: string;
    public app: AppInfo;
    public ui: UiInfo;
    public config: ConfigInfo;
    public contentTypeFormats: { [index:string]: string; };
    public httpHandlers: { [index:string]: string; };
    public plugins: PluginInfo;
    public customPlugins: { [index:string]: CustomPluginInfo; };
    public api: MetadataTypes;
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AppMetadata>) { (Object as any).assign(this, init); }
}

// @DataContract
export class IdResponse
{
    // @DataMember(Order=1)
    public id: string;

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<IdResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminGetRolesResponse
{
    // @DataMember(Order=1)
    public results: AdminRole[];

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminGetRolesResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminGetRoleResponse
{
    // @DataMember(Order=1)
    public result: AdminRole;

    // @DataMember(Order=2)
    public claims: Property[];

    // @DataMember(Order=3)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminGetRoleResponse>) { (Object as any).assign(this, init); }
}

export class AdminDashboardResponse
{
    public serverStats: ServerStats;
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminDashboardResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminApiKeysResponse
{
    // @DataMember(Order=1)
    public results: PartialApiKey[];

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminApiKeysResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminApiKeyResponse
{
    // @DataMember(Order=1)
    public result: string;

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminApiKeyResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class EmptyResponse
{
    // @DataMember(Order=1)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<EmptyResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class ChatResponse
{
    /** @description A unique identifier for the chat completion. */
    // @DataMember(Name="id")
    public id: string;

    /** @description A list of chat completion choices. Can be more than one if n is greater than 1. */
    // @DataMember(Name="choices")
    public choices: Choice[] = [];

    /** @description The Unix timestamp (in seconds) of when the chat completion was created. */
    // @DataMember(Name="created")
    public created: number;

    /** @description The model used for the chat completion. */
    // @DataMember(Name="model")
    public model: string;

    /** @description This fingerprint represents the backend configuration that the model runs with. */
    // @DataMember(Name="system_fingerprint")
    public system_fingerprint: string;

    /** @description The object type, which is always chat.completion. */
    // @DataMember(Name="object")
    public object: string;

    /** @description Specifies the processing type used for serving the request. */
    // @DataMember(Name="service_tier")
    public service_tier: string;

    /** @description Usage statistics for the completion request. */
    // @DataMember(Name="usage")
    public usage: AiUsage;

    /** @description The provider used for the chat completion. */
    // @DataMember(Name="provider")
    public provider: string;

    /** @description Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. */
    // @DataMember(Name="metadata")
    public metadata: { [index:string]: string; };

    // @DataMember(Name="responseStatus")
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<ChatResponse>) { (Object as any).assign(this, init); }
}

export class AdminMonthlyChatCompletionAnalyticsResponse
{
    public month: string;
    public availableMonths: string[] = [];
    public modelStats: ChatCompletionStat[] = [];
    public providerStats: ChatCompletionStat[] = [];
    public dailyStats: ChatCompletionStat[] = [];

    public constructor(init?: Partial<AdminMonthlyChatCompletionAnalyticsResponse>) { (Object as any).assign(this, init); }
}

export class AdminDailyChatCompletionAnalyticsResponse
{
    public modelStats: ChatCompletionStat[] = [];
    public providerStats: ChatCompletionStat[] = [];

    public constructor(init?: Partial<AdminDailyChatCompletionAnalyticsResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AuthenticateResponse implements IHasSessionId, IHasBearerToken
{
    // @DataMember(Order=1)
    public userId: string;

    // @DataMember(Order=2)
    public sessionId: string;

    // @DataMember(Order=3)
    public userName: string;

    // @DataMember(Order=4)
    public displayName: string;

    // @DataMember(Order=5)
    public referrerUrl: string;

    // @DataMember(Order=6)
    public bearerToken: string;

    // @DataMember(Order=7)
    public refreshToken: string;

    // @DataMember(Order=8)
    public refreshTokenExpiry?: string;

    // @DataMember(Order=9)
    public profileUrl: string;

    // @DataMember(Order=10)
    public roles: string[];

    // @DataMember(Order=11)
    public permissions: string[];

    // @DataMember(Order=12)
    public authProvider: string;

    // @DataMember(Order=13)
    public responseStatus: ResponseStatus;

    // @DataMember(Order=14)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AuthenticateResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AssignRolesResponse
{
    // @DataMember(Order=1)
    public allRoles: string[];

    // @DataMember(Order=2)
    public allPermissions: string[];

    // @DataMember(Order=3)
    public meta: { [index:string]: string; };

    // @DataMember(Order=4)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AssignRolesResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class UnAssignRolesResponse
{
    // @DataMember(Order=1)
    public allRoles: string[];

    // @DataMember(Order=2)
    public allPermissions: string[];

    // @DataMember(Order=3)
    public meta: { [index:string]: string; };

    // @DataMember(Order=4)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<UnAssignRolesResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminUserResponse
{
    // @DataMember(Order=1)
    public id: string;

    // @DataMember(Order=2)
    public result: { [index:string]: Object; };

    // @DataMember(Order=3)
    public details: { [index:string]: Object; }[];

    // @DataMember(Order=4)
    public claims: Property[];

    // @DataMember(Order=5)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminUserResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminUsersResponse
{
    // @DataMember(Order=1)
    public results: { [index:string]: Object; }[];

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminUsersResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class AdminDeleteUserResponse
{
    // @DataMember(Order=1)
    public id: string;

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminDeleteUserResponse>) { (Object as any).assign(this, init); }
}

export class AdminProfilingResponse
{
    public results: DiagnosticEntry[] = [];
    public total: number;
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminProfilingResponse>) { (Object as any).assign(this, init); }
}

export class AdminRedisResponse
{
    public db: number;
    public searchResults: RedisSearchResult[];
    public info: { [index:string]: string; };
    public endpoint: RedisEndpointInfo;
    public result: RedisText;
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminRedisResponse>) { (Object as any).assign(this, init); }
}

export class AdminDatabaseResponse
{
    public results: { [index:string]: Object; }[] = [];
    public total?: number;
    public columns: MetadataPropertyType[];
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminDatabaseResponse>) { (Object as any).assign(this, init); }
}

export class ViewCommandsResponse
{
    public commandTotals: CommandSummary[] = [];
    public latestCommands: CommandResult[] = [];
    public latestFailed: CommandResult[] = [];
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<ViewCommandsResponse>) { (Object as any).assign(this, init); }
}

export class ExecuteCommandResponse
{
    public commandResult: CommandResult;
    public result: string;
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<ExecuteCommandResponse>) { (Object as any).assign(this, init); }
}

export class AdminJobDashboardResponse
{
    public commands: JobStatSummary[] = [];
    public apis: JobStatSummary[] = [];
    public workers: JobStatSummary[] = [];
    public today: HourSummary[] = [];
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminJobDashboardResponse>) { (Object as any).assign(this, init); }
}

export class AdminJobInfoResponse
{
    public monthDbs: string[];
    public tableCounts: { [index:string]: number; };
    public workerStats: WorkerStats[];
    public queueCounts: { [index:string]: number; };
    public workerCounts: { [index:string]: number; };
    public stateCounts: { [index:string]: number; };
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminJobInfoResponse>) { (Object as any).assign(this, init); }
}

export class AdminGetJobResponse
{
    public result: JobSummary;
    public queued: BackgroundJob;
    public completed: CompletedJob;
    public failed: FailedJob;
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminGetJobResponse>) { (Object as any).assign(this, init); }
}

export class AdminGetJobProgressResponse
{
    public state: BackgroundJobState;
    public progress?: number;
    public status: string;
    public logs: string;
    public durationMs?: number;
    public error: ResponseStatus;
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminGetJobProgressResponse>) { (Object as any).assign(this, init); }
}

export class AdminRequeueFailedJobsJobsResponse
{
    public results: number[] = [];
    public errors: { [index:number]: string; } = {};
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminRequeueFailedJobsJobsResponse>) { (Object as any).assign(this, init); }
}

export class AdminCancelJobsResponse
{
    public results: number[] = [];
    public errors: { [index:number]: string; } = {};
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminCancelJobsResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class RequestLogsResponse
{
    // @DataMember(Order=1)
    public results: RequestLogEntry[];

    // @DataMember(Order=2)
    public usage: { [index:string]: string; };

    // @DataMember(Order=3)
    public total: number;

    // @DataMember(Order=4)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<RequestLogsResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class GetAnalyticsInfoResponse
{
    // @DataMember(Order=1)
    public months: string[];

    // @DataMember(Order=2)
    public result: AnalyticsLogInfo;

    // @DataMember(Order=3)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<GetAnalyticsInfoResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class GetAnalyticsReportsResponse
{
    // @DataMember(Order=1)
    public result: AnalyticsReports;

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<GetAnalyticsReportsResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class GetValidationRulesResponse
{
    // @DataMember(Order=1)
    public results: ValidationRule[];

    // @DataMember(Order=2)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<GetValidationRulesResponse>) { (Object as any).assign(this, init); }
}

// @Route("/metadata/app")
// @DataContract
export class MetadataApp implements IReturn<AppMetadata>, IGet
{
    // @DataMember(Order=1)
    public view: string;

    // @DataMember(Order=2)
    public includeTypes: string[];

    public constructor(init?: Partial<MetadataApp>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'MetadataApp'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AppMetadata(); }
}

// @DataContract
export class AdminCreateRole implements IReturn<IdResponse>, IPost
{
    // @DataMember(Order=1)
    public name: string;

    public constructor(init?: Partial<AdminCreateRole>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminCreateRole'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new IdResponse(); }
}

// @DataContract
export class AdminGetRoles implements IReturn<AdminGetRolesResponse>, IGet
{

    public constructor(init?: Partial<AdminGetRoles>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminGetRoles'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminGetRolesResponse(); }
}

// @DataContract
export class AdminGetRole implements IReturn<AdminGetRoleResponse>, IGet
{
    // @DataMember(Order=1)
    public id: string;

    public constructor(init?: Partial<AdminGetRole>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminGetRole'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminGetRoleResponse(); }
}

// @DataContract
export class AdminUpdateRole implements IReturn<IdResponse>, IPost
{
    // @DataMember(Order=1)
    public id: string;

    // @DataMember(Order=2)
    public name: string;

    // @DataMember(Order=3)
    public addClaims: Property[];

    // @DataMember(Order=4)
    public removeClaims: Property[];

    // @DataMember(Order=5)
    public responseStatus: ResponseStatus;

    public constructor(init?: Partial<AdminUpdateRole>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminUpdateRole'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new IdResponse(); }
}

// @DataContract
export class AdminDeleteRole implements IReturnVoid, IDelete
{
    // @DataMember(Order=1)
    public id: string;

    public constructor(init?: Partial<AdminDeleteRole>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminDeleteRole'; }
    public getMethod() { return 'DELETE'; }
    public createResponse() {}
}

export class AdminDashboard implements IReturn<AdminDashboardResponse>, IGet
{

    public constructor(init?: Partial<AdminDashboard>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminDashboard'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminDashboardResponse(); }
}

// @DataContract
export class AdminQueryApiKeys implements IReturn<AdminApiKeysResponse>, IGet
{
    // @DataMember(Order=1)
    public id?: number;

    // @DataMember(Order=2)
    public apiKey: string;

    // @DataMember(Order=3)
    public search: string;

    // @DataMember(Order=4)
    public userId: string;

    // @DataMember(Order=5)
    public userName: string;

    // @DataMember(Order=6)
    public orderBy: string;

    // @DataMember(Order=7)
    public skip?: number;

    // @DataMember(Order=8)
    public take?: number;

    public constructor(init?: Partial<AdminQueryApiKeys>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryApiKeys'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminApiKeysResponse(); }
}

// @DataContract
export class AdminCreateApiKey implements IReturn<AdminApiKeyResponse>, IPost
{
    // @DataMember(Order=1)
    public name: string;

    // @DataMember(Order=2)
    public userId: string;

    // @DataMember(Order=3)
    public userName: string;

    // @DataMember(Order=4)
    public scopes: string[];

    // @DataMember(Order=5)
    public features: string[];

    // @DataMember(Order=6)
    public restrictTo: string[];

    // @DataMember(Order=7)
    public expiryDate?: string;

    // @DataMember(Order=8)
    public notes: string;

    // @DataMember(Order=9)
    public refId?: number;

    // @DataMember(Order=10)
    public refIdStr: string;

    // @DataMember(Order=11)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AdminCreateApiKey>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminCreateApiKey'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AdminApiKeyResponse(); }
}

// @DataContract
export class AdminUpdateApiKey implements IReturn<EmptyResponse>, IPatch
{
    // @DataMember(Order=1)
    // @Validate(Validator="GreaterThan(0)")
    public id: number;

    // @DataMember(Order=2)
    public name: string;

    // @DataMember(Order=3)
    public userId: string;

    // @DataMember(Order=4)
    public userName: string;

    // @DataMember(Order=5)
    public scopes: string[];

    // @DataMember(Order=6)
    public features: string[];

    // @DataMember(Order=7)
    public restrictTo: string[];

    // @DataMember(Order=8)
    public expiryDate?: string;

    // @DataMember(Order=9)
    public cancelledDate?: string;

    // @DataMember(Order=10)
    public notes: string;

    // @DataMember(Order=11)
    public refId?: number;

    // @DataMember(Order=12)
    public refIdStr: string;

    // @DataMember(Order=13)
    public meta: { [index:string]: string; };

    // @DataMember(Order=14)
    public reset: string[];

    public constructor(init?: Partial<AdminUpdateApiKey>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminUpdateApiKey'; }
    public getMethod() { return 'PATCH'; }
    public createResponse() { return new EmptyResponse(); }
}

// @DataContract
export class AdminDeleteApiKey implements IReturn<EmptyResponse>, IDelete
{
    // @DataMember(Order=1)
    // @Validate(Validator="GreaterThan(0)")
    public id?: number;

    public constructor(init?: Partial<AdminDeleteApiKey>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminDeleteApiKey'; }
    public getMethod() { return 'DELETE'; }
    public createResponse() { return new EmptyResponse(); }
}

/** @description Chat Completions API (OpenAI-Compatible) */
// @Route("/v1/chat/completions", "POST")
// @DataContract
export class ChatCompletion implements IReturn<ChatResponse>, IPost
{
    /** @description The messages to generate chat completions for. */
    // @DataMember(Name="messages")
    public messages: AiMessage[] = [];

    /** @description ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API */
    // @DataMember(Name="model")
    public model: string;

    /** @description Parameters for audio output. Required when audio output is requested with modalities: [audio] */
    // @DataMember(Name="audio")
    public audio: AiChatAudio;

    /** @description Modify the likelihood of specified tokens appearing in the completion. */
    // @DataMember(Name="logit_bias")
    public logit_bias: { [index:number]: number; };

    /** @description Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. */
    // @DataMember(Name="metadata")
    public metadata: { [index:string]: string; };

    /** @description Constrains effort on reasoning for reasoning models. Currently supported values are minimal, low, medium, and high (none, default). Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. */
    // @DataMember(Name="reasoning_effort")
    public reasoning_effort: string;

    /** @description An object specifying the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`. Setting Type to ResponseFormat.JsonObject enables JSON mode, which guarantees the message the model generates is valid JSON. */
    // @DataMember(Name="response_format")
    public response_format: AiResponseFormat;

    /** @description Specifies the processing type used for serving the request. */
    // @DataMember(Name="service_tier")
    public service_tier: string;

    /** @description A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. */
    // @DataMember(Name="safety_identifier")
    public safety_identifier: string;

    /** @description Up to 4 sequences where the API will stop generating further tokens. */
    // @DataMember(Name="stop")
    public stop: string[];

    /** @description Output types that you would like the model to generate. Most models are capable of generating text, which is the default: */
    // @DataMember(Name="modalities")
    public modalities: string[];

    /** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. */
    // @DataMember(Name="prompt_cache_key")
    public prompt_cache_key: string;

    /** @description A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. */
    // @DataMember(Name="tools")
    public tools: Tool[];

    /** @description Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses. Currently supported values are low, medium, and high. */
    // @DataMember(Name="verbosity")
    public verbosity: string;

    /** @description What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. */
    // @DataMember(Name="temperature")
    public temperature?: number;

    /** @description An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. */
    // @DataMember(Name="max_completion_tokens")
    public max_completion_tokens?: number;

    /** @description An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used. */
    // @DataMember(Name="top_logprobs")
    public top_logprobs?: number;

    /** @description An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. */
    // @DataMember(Name="top_p")
    public top_p?: number;

    /** @description Number between `-2.0` and `2.0`. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. */
    // @DataMember(Name="frequency_penalty")
    public frequency_penalty?: number;

    /** @description Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. */
    // @DataMember(Name="presence_penalty")
    public presence_penalty?: number;

    /** @description This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend. */
    // @DataMember(Name="seed")
    public seed?: number;

    /** @description How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. */
    // @DataMember(Name="n")
    public n?: number;

    /** @description Whether or not to store the output of this chat completion request for use in our model distillation or evals products. */
    // @DataMember(Name="store")
    public store?: boolean;

    /** @description Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message. */
    // @DataMember(Name="logprobs")
    public logprobs?: boolean;

    /** @description Whether to enable parallel function calling during tool use. */
    // @DataMember(Name="parallel_tool_calls")
    public parallel_tool_calls?: boolean;

    /** @description Whether to enable thinking mode for some Qwen models and providers. */
    // @DataMember(Name="enable_thinking")
    public enable_thinking?: boolean;

    /** @description If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message. */
    // @DataMember(Name="stream")
    public stream?: boolean;

    public constructor(init?: Partial<ChatCompletion>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'ChatCompletion'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new ChatResponse(); }
}

export class AdminQueryChatCompletionLogs extends QueryDb<ChatCompletionLog> implements IReturn<QueryResponse<ChatCompletionLog>>
{
    public month?: string;

    public constructor(init?: Partial<AdminQueryChatCompletionLogs>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryChatCompletionLogs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<ChatCompletionLog>(); }
}

export class AdminMonthlyChatCompletionAnalytics implements IReturn<AdminMonthlyChatCompletionAnalyticsResponse>, IGet
{
    public month?: string;

    public constructor(init?: Partial<AdminMonthlyChatCompletionAnalytics>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminMonthlyChatCompletionAnalytics'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminMonthlyChatCompletionAnalyticsResponse(); }
}

export class AdminDailyChatCompletionAnalytics implements IReturn<AdminDailyChatCompletionAnalyticsResponse>, IGet
{
    public day?: string;

    public constructor(init?: Partial<AdminDailyChatCompletionAnalytics>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminDailyChatCompletionAnalytics'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminDailyChatCompletionAnalyticsResponse(); }
}

/** @description Sign In */
// @Route("/auth", "GET,POST")
// @Route("/auth/{provider}", "GET,POST")
// @Api(Description="Sign In")
// @DataContract
export class Authenticate implements IReturn<AuthenticateResponse>, IPost
{
    /** @description AuthProvider, e.g. credentials */
    // @DataMember(Order=1)
    public provider: string;

    // @DataMember(Order=2)
    public userName: string;

    // @DataMember(Order=3)
    public password: string;

    // @DataMember(Order=4)
    public rememberMe?: boolean;

    // @DataMember(Order=5)
    public accessToken: string;

    // @DataMember(Order=6)
    public accessTokenSecret: string;

    // @DataMember(Order=7)
    public returnUrl: string;

    // @DataMember(Order=8)
    public errorView: string;

    // @DataMember(Order=9)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<Authenticate>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'Authenticate'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AuthenticateResponse(); }
}

// @Route("/assignroles", "POST")
// @DataContract
export class AssignRoles implements IReturn<AssignRolesResponse>, IPost
{
    // @DataMember(Order=1)
    public userName: string;

    // @DataMember(Order=2)
    public permissions: string[];

    // @DataMember(Order=3)
    public roles: string[];

    // @DataMember(Order=4)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<AssignRoles>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AssignRoles'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AssignRolesResponse(); }
}

// @Route("/unassignroles", "POST")
// @DataContract
export class UnAssignRoles implements IReturn<UnAssignRolesResponse>, IPost
{
    // @DataMember(Order=1)
    public userName: string;

    // @DataMember(Order=2)
    public permissions: string[];

    // @DataMember(Order=3)
    public roles: string[];

    // @DataMember(Order=4)
    public meta: { [index:string]: string; };

    public constructor(init?: Partial<UnAssignRoles>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'UnAssignRoles'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new UnAssignRolesResponse(); }
}

// @DataContract
export class AdminGetUser implements IReturn<AdminUserResponse>, IGet
{
    // @DataMember(Order=10)
    public id: string;

    public constructor(init?: Partial<AdminGetUser>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminGetUser'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminUserResponse(); }
}

// @DataContract
export class AdminQueryUsers implements IReturn<AdminUsersResponse>, IGet
{
    // @DataMember(Order=1)
    public query: string;

    // @DataMember(Order=2)
    public orderBy: string;

    // @DataMember(Order=3)
    public skip?: number;

    // @DataMember(Order=4)
    public take?: number;

    public constructor(init?: Partial<AdminQueryUsers>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryUsers'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminUsersResponse(); }
}

// @DataContract
export class AdminCreateUser extends AdminUserBase implements IReturn<AdminUserResponse>, IPost
{
    // @DataMember(Order=10)
    public roles: string[];

    // @DataMember(Order=11)
    public permissions: string[];

    public constructor(init?: Partial<AdminCreateUser>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminCreateUser'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AdminUserResponse(); }
}

// @DataContract
export class AdminUpdateUser extends AdminUserBase implements IReturn<AdminUserResponse>, IPut
{
    // @DataMember(Order=10)
    public id: string;

    // @DataMember(Order=11)
    public lockUser?: boolean;

    // @DataMember(Order=12)
    public unlockUser?: boolean;

    // @DataMember(Order=13)
    public lockUserUntil?: string;

    // @DataMember(Order=14)
    public addRoles: string[];

    // @DataMember(Order=15)
    public removeRoles: string[];

    // @DataMember(Order=16)
    public addPermissions: string[];

    // @DataMember(Order=17)
    public removePermissions: string[];

    // @DataMember(Order=18)
    public addClaims: Property[];

    // @DataMember(Order=19)
    public removeClaims: Property[];

    public constructor(init?: Partial<AdminUpdateUser>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminUpdateUser'; }
    public getMethod() { return 'PUT'; }
    public createResponse() { return new AdminUserResponse(); }
}

// @DataContract
export class AdminDeleteUser implements IReturn<AdminDeleteUserResponse>, IDelete
{
    // @DataMember(Order=10)
    public id: string;

    public constructor(init?: Partial<AdminDeleteUser>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminDeleteUser'; }
    public getMethod() { return 'DELETE'; }
    public createResponse() { return new AdminDeleteUserResponse(); }
}

export class AdminQueryRequestLogs extends QueryDb<RequestLog> implements IReturn<QueryResponse<RequestLog>>
{
    public month?: string;

    public constructor(init?: Partial<AdminQueryRequestLogs>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryRequestLogs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<RequestLog>(); }
}

export class AdminProfiling implements IReturn<AdminProfilingResponse>
{
    public source: string;
    public eventType: string;
    public threadId?: number;
    public traceId: string;
    public userAuthId: string;
    public sessionId: string;
    public tag: string;
    public skip: number;
    public take?: number;
    public orderBy: string;
    public withErrors?: boolean;
    public pending?: boolean;

    public constructor(init?: Partial<AdminProfiling>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminProfiling'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AdminProfilingResponse(); }
}

export class AdminRedis implements IReturn<AdminRedisResponse>, IPost
{
    public db?: number;
    public query: string;
    public reconnect: RedisEndpointInfo;
    public take?: number;
    public position?: number;
    public args: string[];

    public constructor(init?: Partial<AdminRedis>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminRedis'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AdminRedisResponse(); }
}

export class AdminDatabase implements IReturn<AdminDatabaseResponse>, IGet
{
    public db: string;
    public schema: string;
    public table: string;
    public fields: string[];
    public take?: number;
    public skip?: number;
    public orderBy: string;
    public include: string;

    public constructor(init?: Partial<AdminDatabase>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminDatabase'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminDatabaseResponse(); }
}

export class ViewCommands implements IReturn<ViewCommandsResponse>, IGet
{
    public include: string[];
    public skip?: number;
    public take?: number;

    public constructor(init?: Partial<ViewCommands>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'ViewCommands'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new ViewCommandsResponse(); }
}

export class ExecuteCommand implements IReturn<ExecuteCommandResponse>, IPost
{
    public command: string;
    public requestJson: string;

    public constructor(init?: Partial<ExecuteCommand>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'ExecuteCommand'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new ExecuteCommandResponse(); }
}

export class AdminJobDashboard implements IReturn<AdminJobDashboardResponse>, IGet
{
    public from?: string;
    public to?: string;

    public constructor(init?: Partial<AdminJobDashboard>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminJobDashboard'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminJobDashboardResponse(); }
}

export class AdminJobInfo implements IReturn<AdminJobInfoResponse>, IGet
{
    public month?: string;

    public constructor(init?: Partial<AdminJobInfo>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminJobInfo'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminJobInfoResponse(); }
}

export class AdminGetJob implements IReturn<AdminGetJobResponse>, IGet
{
    public id?: number;
    public refId: string;

    public constructor(init?: Partial<AdminGetJob>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminGetJob'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminGetJobResponse(); }
}

export class AdminGetJobProgress implements IReturn<AdminGetJobProgressResponse>, IGet
{
    // @Validate(Validator="GreaterThan(0)")
    public id: number;

    public logStart?: number;

    public constructor(init?: Partial<AdminGetJobProgress>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminGetJobProgress'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminGetJobProgressResponse(); }
}

export class AdminQueryBackgroundJobs extends QueryDb<BackgroundJob> implements IReturn<QueryResponse<BackgroundJob>>
{
    public id?: number;
    public refId: string;

    public constructor(init?: Partial<AdminQueryBackgroundJobs>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryBackgroundJobs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<BackgroundJob>(); }
}

export class AdminQueryJobSummary extends QueryDb<JobSummary> implements IReturn<QueryResponse<JobSummary>>
{
    public id?: number;
    public refId: string;

    public constructor(init?: Partial<AdminQueryJobSummary>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryJobSummary'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<JobSummary>(); }
}

export class AdminQueryScheduledTasks extends QueryDb<ScheduledTask> implements IReturn<QueryResponse<ScheduledTask>>
{

    public constructor(init?: Partial<AdminQueryScheduledTasks>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryScheduledTasks'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<ScheduledTask>(); }
}

export class AdminQueryCompletedJobs extends QueryDb<CompletedJob> implements IReturn<QueryResponse<CompletedJob>>
{
    public month?: string;

    public constructor(init?: Partial<AdminQueryCompletedJobs>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryCompletedJobs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<CompletedJob>(); }
}

export class AdminQueryFailedJobs extends QueryDb<FailedJob> implements IReturn<QueryResponse<FailedJob>>
{
    public month?: string;

    public constructor(init?: Partial<AdminQueryFailedJobs>) { super(init); (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminQueryFailedJobs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new QueryResponse<FailedJob>(); }
}

export class AdminRequeueFailedJobs implements IReturn<AdminRequeueFailedJobsJobsResponse>
{
    public ids: number[];

    public constructor(init?: Partial<AdminRequeueFailedJobs>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminRequeueFailedJobs'; }
    public getMethod() { return 'POST'; }
    public createResponse() { return new AdminRequeueFailedJobsJobsResponse(); }
}

export class AdminCancelJobs implements IReturn<AdminCancelJobsResponse>, IGet
{
    public ids: number[];
    public worker: string;
    public state?: BackgroundJobState;
    public cancelWorker: string;

    public constructor(init?: Partial<AdminCancelJobs>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'AdminCancelJobs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new AdminCancelJobsResponse(); }
}

// @Route("/requestlogs")
// @DataContract
export class RequestLogs implements IReturn<RequestLogsResponse>, IGet
{
    // @DataMember(Order=1)
    public beforeSecs?: number;

    // @DataMember(Order=2)
    public afterSecs?: number;

    // @DataMember(Order=3)
    public operationName: string;

    // @DataMember(Order=4)
    public ipAddress: string;

    // @DataMember(Order=5)
    public forwardedFor: string;

    // @DataMember(Order=6)
    public userAuthId: string;

    // @DataMember(Order=7)
    public sessionId: string;

    // @DataMember(Order=8)
    public referer: string;

    // @DataMember(Order=9)
    public pathInfo: string;

    // @DataMember(Order=10)
    public bearerToken: string;

    // @DataMember(Order=11)
    public ids: number[];

    // @DataMember(Order=12)
    public beforeId?: number;

    // @DataMember(Order=13)
    public afterId?: number;

    // @DataMember(Order=14)
    public hasResponse?: boolean;

    // @DataMember(Order=15)
    public withErrors?: boolean;

    // @DataMember(Order=16)
    public enableSessionTracking?: boolean;

    // @DataMember(Order=17)
    public enableResponseTracking?: boolean;

    // @DataMember(Order=18)
    public enableErrorTracking?: boolean;

    // @DataMember(Order=19)
    public durationLongerThan?: string;

    // @DataMember(Order=20)
    public durationLessThan?: string;

    // @DataMember(Order=21)
    public skip: number;

    // @DataMember(Order=22)
    public take?: number;

    // @DataMember(Order=23)
    public orderBy: string;

    // @DataMember(Order=24)
    public month?: string;

    public constructor(init?: Partial<RequestLogs>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'RequestLogs'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new RequestLogsResponse(); }
}

// @DataContract
export class GetAnalyticsInfo implements IReturn<GetAnalyticsInfoResponse>, IGet
{
    // @DataMember(Order=1)
    public month?: string;

    // @DataMember(Order=2)
    public type: string;

    // @DataMember(Order=3)
    public op: string;

    // @DataMember(Order=4)
    public apiKey: string;

    // @DataMember(Order=5)
    public userId: string;

    // @DataMember(Order=6)
    public ip: string;

    public constructor(init?: Partial<GetAnalyticsInfo>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'GetAnalyticsInfo'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new GetAnalyticsInfoResponse(); }
}

// @DataContract
export class GetAnalyticsReports implements IReturn<GetAnalyticsReportsResponse>, IGet
{
    // @DataMember(Order=1)
    public month?: string;

    // @DataMember(Order=2)
    public filter: string;

    // @DataMember(Order=3)
    public value: string;

    // @DataMember(Order=4)
    public force?: boolean;

    public constructor(init?: Partial<GetAnalyticsReports>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'GetAnalyticsReports'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new GetAnalyticsReportsResponse(); }
}

// @Route("/validation/rules/{Type}")
// @DataContract
export class GetValidationRules implements IReturn<GetValidationRulesResponse>, IGet
{
    // @DataMember(Order=1)
    public authSecret: string;

    // @DataMember(Order=2)
    public type: string;

    public constructor(init?: Partial<GetValidationRules>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'GetValidationRules'; }
    public getMethod() { return 'GET'; }
    public createResponse() { return new GetValidationRulesResponse(); }
}

// @Route("/validation/rules")
// @DataContract
export class ModifyValidationRules implements IReturnVoid
{
    // @DataMember(Order=1)
    public authSecret: string;

    // @DataMember(Order=2)
    public saveRules: ValidationRule[];

    // @DataMember(Order=3)
    public deleteRuleIds: number[];

    // @DataMember(Order=4)
    public suspendRuleIds: number[];

    // @DataMember(Order=5)
    public unsuspendRuleIds: number[];

    // @DataMember(Order=6)
    public clearCache?: boolean;

    public constructor(init?: Partial<ModifyValidationRules>) { (Object as any).assign(this, init); }
    public getTypeName() { return 'ModifyValidationRules'; }
    public getMethod() { return 'POST'; }
    public createResponse() {}
}

